/*
function getHtml() {
  var prefs = new gadgets.Prefs();
  var params = {"user" : prefs.getString("user")};
  alert(prefs.getString("user"));
  params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
  var url = "http://paraglideapp.appspot.com/_wave/robot/jsonrpc";
  gadgets.io.makeRequest(url, response, params);
}
function response(obj) {
  //obj.text contains the text of the page that was requested
  var str = obj.text;
  document.getElementById('content_div').innerHTML = str.substr(0, 400);
}
gadgets.util.registerOnLoadHandler(getHtml);*/

function init() {
  if (wave && wave.isInWaveContainer()) {
    wave.setStateCallback(function(){
      wave.getState().submitDelta({'version': '0'});      
    });
  }
}
gadgets.util.registerOnLoadHandler(init);